home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / qbwinfnt.zip / FNTSTRUC.BI < prev    next >
Text File  |  1994-03-01  |  8KB  |  132 lines

  1.       REM:  FNTSTRUC.BI, Unregistered Version 1.0
  2.       REM:  Include file for QBWINFNT.BAS
  3.      
  4.       TYPE FontDirEntryType
  5.         FontOrdinal    AS INTEGER      '...unique ordinal value identifying font
  6.         Version        AS INTEGER      '...version
  7.         Size           AS LONG         '...size of font in bytes
  8.         Copyright      AS STRING * 60  '...copyright string
  9.         FType          AS INTEGER      '...font type
  10.         Pnt            AS INTEGER      '...point size for optimum display
  11.         VertRes        AS INTEGER      '...vertical resolution in pixels per inch
  12.         HorizRes       AS INTEGER      '...horizontal resolution in pixels per inch
  13.         Ascent         AS INTEGER      '...distance from top of char cell to baseline
  14.         IntLeading     AS INTEGER      '...distance above tops of char's to top of cell
  15.         ExtLeading     AS INTEGER      '...recommended distance above top of cell
  16.         Italic         AS STRING * 1   '...italic font if equal to 1
  17.         Underline      AS STRING * 1   '...underlined font if equal to 1
  18.         StrikeOut      AS STRING * 1   '...strike-out font if equal to 1
  19.         Weight         AS INTEGER      '...relative weight
  20.         CharSet        AS STRING * 1   '...character set
  21.         PixWidth       AS INTEGER      '...width of character grid in pixels
  22.         PixHeight      AS INTEGER      '...height of character grid in pixels
  23.         PitchandFamily AS STRING * 1   '...description of pitch and family
  24.         AvgWidth       AS INTEGER      '...average width
  25.         MaxWidth       AS INTEGER      '...width of widest character
  26.         FirstChar      AS STRING * 1   '...ASCII value of first char
  27.         LastChar       AS STRING * 1   '...ASCII value of last char
  28.         DefaultChar    AS STRING * 1   '...relative char value for out of range chars
  29.         BreakChar      AS STRING * 1   '...relative char value for word seperator char
  30.         WidthBytes     AS INTEGER      '...number of bytes in each row
  31.         Device         AS LONG         '...offset in bytes to font's device name string
  32.         Face           AS LONG         '...offset in bytes to face name
  33.         Reserved       AS LONG         '...reserved
  34.       END TYPE
  35.      
  36.       TYPE FontType
  37.         Version        AS INTEGER      '...version
  38.         Size           AS LONG         '...size of font in bytes
  39.         Copyright      AS STRING * 60  '...copyright string
  40.         FType          AS INTEGER      '...font type
  41.         Pnt            AS INTEGER      '...point size for optimum display
  42.         VertRes        AS INTEGER      '...vertical resolution in pixels per inch
  43.         HorizRes       AS INTEGER      '...horizontal resolution in pixels per inch
  44.         Ascent         AS INTEGER      '...distance from top of char cell to baseline
  45.         IntLeading     AS INTEGER      '...distance above tops of char's to top of cell
  46.         ExtLeading     AS INTEGER      '...recommended distance above top of cell
  47.         Italic         AS STRING * 1   '...italic font if equal to 1
  48.         Underline      AS STRING * 1   '...underlined font if equal to 1
  49.         StrikeOut      AS STRING * 1   '...strike-out font if equal to 1
  50.         Weight         AS INTEGER      '...relative weight
  51.         CharSet        AS STRING * 1   '...character set
  52.         PixWidth       AS INTEGER      '...width of character grid in pixels
  53.         PixHeight      AS INTEGER      '...height of character grid in pixels
  54.         PitchandFamily AS STRING * 1   '...description of pitch and family
  55.         AvgWidth       AS INTEGER      '...average width
  56.         MaxWidth       AS INTEGER      '...width of widest character
  57.         FirstChar      AS STRING * 1   '...ASCII value of first char
  58.         LastChar       AS STRING * 1   '...ASCII value of last char
  59.         DefaultChar    AS STRING * 1   '...relative char value for out of range chars
  60.         BreakChar      AS STRING * 1   '...relative char value for word seperator char
  61.         WidthBytes     AS INTEGER      '...number of bytes in each row
  62.         Device         AS LONG         '...offset in bytes to font's device name string
  63.         Face           AS LONG         '...offset in bytes to face name
  64.         BitsPointer    AS LONG         '...unused and set to zero
  65.         BitsOffset     AS LONG         '...offset in bytes to start of bitmap or stroke data
  66.         Reserved1      AS STRING * 1   '...reserved
  67.       END TYPE
  68.      
  69.       TYPE ExeHdrType
  70.         Signature      AS STRING * 2   '...MZ for valid EXE code file
  71.         ExtraBytes     AS INTEGER      '...number bytes in last page
  72.         Pages          AS INTEGER      '...number whole & partial pages (512 bytes)
  73.         RelocItems     AS INTEGER      '...number relocation table pointers
  74.         HeaderSize     AS INTEGER      '...number 16 byte paragraphs in header
  75.         UnusedHere     AS STRING * 50  '...values not needed by this program
  76.         WinInfoOffset  AS INTEGER      '...offset in bytes to WinInfo structure
  77.       END TYPE
  78.   
  79.       TYPE WinInfoType
  80.         Signature      AS STRING * 2   '...NE if valid
  81.         UnusedHere1    AS STRING * 34  '...values not needed by this program
  82.         ResTabOffset   AS INTEGER      '...offset to resource table (in bytes relative to WinInfo)
  83.         UnusedHere2    AS STRING * 26  '...values not needed by this program
  84.       END TYPE
  85.  
  86.       TYPE ResInfoType
  87.         TypeID         AS INTEGER      '...resource type
  88.         ResCount       AS INTEGER      '...number of resources of this type
  89.         Reserved       AS LONG         '...unused
  90.       END TYPE
  91.  
  92.       TYPE NameInfoType
  93.         Offset         AS INTEGER      '...offset in alignment units
  94.         Length         AS INTEGER      '...length in bytes of resource
  95.         Flags          AS INTEGER      '...resource flags
  96.         ID             AS INTEGER      '...identifier
  97.         Reserved1      AS INTEGER      '...unused or reserved
  98.         Reserved2      AS INTEGER      '...unused or reserved
  99.       END TYPE
  100.    
  101.       TYPE GlyphType
  102.         PWidth         AS INTEGER      '...character width in pixels
  103.         Offset         AS INTEGER      '...offset to character bitmap
  104.       END TYPE
  105.  
  106.  
  107. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  108. ' FONT Structure:
  109. '     Font Height  --  0  --  2 bytes  -- Char height in pixels
  110. '     Number Chars --  1  --  2 bytes  -- Total number of characters
  111. '     First Char   --  2  --  2 bytes  -- First character in set
  112. '     Last Char    --  3  --  2 bytes  -- Last character in set
  113. '     Default Char --  4  --  2 bytes  -- Default character
  114. '     Break Char   --  5  --  2 bytes  -- Break character
  115. '     Max Width    --  6  --  2 bytes  -- Max char width
  116. '     Vert Spacing --  7  --  2 bytes  -- Vertical spacing
  117. '     Ascent       --  8  --  2 bytes  -- Distance from char top to baseline
  118. '     Pad Width    --  9  --  2 bytes  -- Extra pixels to add between chars
  119. '     Pad Height   -- 10  --  2 bytes  -- Extra pixels to add between lines
  120. '     Char Width   --  2 bytes/char    -- Char width in pixels
  121. '     Char Offset  --  2 bytes/char    -- Char offset into bitmap
  122. '
  123. ' Notes: (1) The total number of characters N = LastChar - FirstChar + 1
  124. '        (2) Char width consists of 2 bytes per character.  The width of
  125. '            a given character c% is given by: FontArray%(10+c%)
  126. '        (3) Char offset consists of 2 bytes per character.  The offset of
  127. '            a given character c% is given by: FontArray%(10+N+c%)
  128. '
  129. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  130.  
  131.  
  132.